/*
 * Map.h
 *
 *  Created on: 11/11/2011
 *      Author: marcio
 */

#ifndef MAP_H_
#define MAP_H_

typedef struct{
	void* keys;
	void* values;
	int size;
	int last;
	int (*compkey)(void*, void*);
	int (*compvalue)(void*, void*);
}Map;

Map* map_newMap(int size, int (*fk)(void*, void*), int (*fi)(void*, void*));

int map_add(Map* m, void* key, void* value);

int map_addAll(Map* m, void** key, void** value, int size);

void* map_getValue(Map* m, void* key);

void* map_getKey(Map* m, void* value);

int map_getAll(Map* m, void** key, void** value);

int map_seachForKey(Map* m, void* key);

int map_searchForValue(Map* m, void* value);

int map_isEmpty(Map* m);

int map_isFull(Map* m);

#endif /* MAP_H_ */
